#pragma once
#include "ataskinterface.h"
#include <string>
#include <qobject.h>

using std::string;
#include "gdal_priv.h"
class TheTask :public QObject, public ARSSTaskInterface
{
	Q_OBJECT
public:
	TheTask(string infileR,int redband1based,
		string infileN,int nirband1based,
		string outfile, double coefA,double coefB,double scale);
	virtual void run() ;

signals:
	void taskDone() ;

private:
	string _infileR;
	int    _redBand1Based;
	string _infileN;
	int    _nirBand1Based;
	string _outfile;
	double _coefA;
	double _coefB;
	double _scale;
	void doOne(GDALDataset* indsR, GDALDataset* indsN, GDALDataset* outds, int rb1b, int nb1b,
		const int xsize, const int ysize,
		double cA, double cB,double scale);
};

